<template>
  <view>
    <view class="publishContain defaultMain">
<!--      <u-cell-group>
        <u-cell-item title="标题" :arrow="false" :border="false" required :value="title"></u-cell-item>
      </u-cell-group>-->
      <mypicturefeed ref="mypicture" type="detail" :album-list="takePicList">
        <view>反馈拍照</view>
      </mypicturefeed>
      <myvideofeed ref="myvideo" type="detail" :old-video-list="videoList">
        <view>反馈录像</view>
      </myvideofeed>
      <!-- 描述 -->
      <view class="desStyle">
        <view class="desLabel">
          <view style="margin-bottom: 26rpx;">反馈描述</view>
        </view>
        <view class="desContent">
          {{ fd_description }}
        </view>
      </view>
      <view class="desStyle" v-if="audit_status === 0">
        <view class="desLabel">
          <view style="margin-bottom: 26rpx;">被拒原因</view>
        </view>
        <view class="desContent">
          {{ fail_reason }}
        </view>
      </view>
    </view>
  </view>
</template>
<script>
import mypicturefeed from "../picvideo/picture.vue";
import myvideofeed from "../picvideo/video.vue";

export default {
  name: "feedDetail",
  props: {
    content_id: {
      type: Number,
      default: 0
    },
    fd_description: {
      type: String,
      default: ''
    },
    fail_reason: {
      type: String,
      default: ''
    },
    takePicList: {
      type: Array,
      default: []
    },
    videoList: {
      type: Array,
      default: []
    },
    audit_status: {
      type: Number,
      default: 0
    }
  },
  components: {
    mypicturefeed,
    myvideofeed
  },
  mounted() {
    // const content_id = this.$Router.extract(this.options).content_id
    /*contentInfo({content_id: this.content_id}).then(res => {
      console.log('suiDetail mounted---',typeof res.imgs, res)
      this.content_id = res.content_id
      this.title = res.name
      this.category_id = res.category_id
      this.category_name = res.category_name
      this.description = res.description
      this.takePicList = res.imgs
      this.$refs.mypicture.$data.takePicList = res.imgs
      this.videoList = res.videos
      this.$refs.myvideo.$data.videoList = res.videos
      this.photographFree.latitude = res.latitude
      this.photographFree.longitude = res.longitude
    })*/
  },
  /* onLoad (options) {
    if (options.encodedData !== 'undefined') {
      const { id, title, pic, status, description } = this.$Router.extract(options).record
      this.id = id
      this.title = title
      this.pic = pic
      this.status = status
      this.description = description
    }
  }, */
  data() {
    return {
      title: '',
      // takePicList: [],
      // videoList: [],
      // 地图
      // mapVisible: false,
      // photographFree: {
      //   latitude: null,
      //   longitude: null,
      // },
      // 描述
      // description: '',
      type: "textarea",
      border: true,
      width: 750,
      height: 150,
      autoHeight: true,
      //  类别
     /* show: false,
      category_id: 0,
      category_name: '',
      list: []*/
    }
  },
  methods: {
    init () {
      // console.log('feedSubmit init----', this.takePicList, this.videoList)
      this.$refs.mypicture.$data.takePicList = this.takePicList
      this.$refs.myvideo.$data.videoList = this.videoList
    },
  },
};
</script>
<style lang="scss" scoped>
.publishContain {
  padding: 0 0 100rpx;
  background-color: #fff;
}
.desStyle {
  padding: 20rpx;
  background-color: #fff;
}
.desLabel {
  display: flex;
  justify-content: space-between;
}
.desContent {
  width: 100%;
  min-height: 300rpx;
  padding: 20rpx;
  border: 1rpx solid #eee;
  border-radius: 10rpx;
}
</style>